home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / fpu881 / src6.zoo / float.h < prev    next >
C/C++ Source or Header  |  1991-09-24  |  3KB  |  80 lines

  1. /*
  2.  * float.h
  3.  *    see sec 2.2.4.2 and 4.1.3 of ansi draft
  4.  *
  5.  *    this implementation strives to meet these values, but actually
  6.  *    does'nt quite make it, so we lie
  7.  *    i need help here!
  8.  *        ++jrb
  9.  */
  10. #ifndef _FLOAT_H
  11. #define _FLOAT_H
  12.  
  13. /* float.h */
  14. /* hacked by mjr according to K&R (ansi draft), 11.5.91 */
  15.  
  16.    /* Radix of exponent representation */
  17. #define FLT_RADIX 2
  18.    /* Number of base-FLT_RADIX digits in the mantissa of a float */
  19. #define FLT_MANT_DIG 23 /* mjr was 24 */
  20.    /* Number of decimal digits of precision in a float */
  21. #define FLT_DIG 6
  22.    /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
  23. #define FLT_ROUNDS 1
  24.    /* Minimum float x such that 1.0+x != 1.0 */
  25. #define FLT_EPSILON 1.0e-6
  26.    /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
  27. #define FLT_MIN_EXP (-125)
  28.    /* Minimum normalised float */
  29. #define FLT_MIN 1.0e-37F
  30.    /* Minimum int x such that 10**x is a normalised float */
  31. #define FLT_MIN_10_EXP (-37)
  32.    /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
  33. #define FLT_MAX_EXP 127
  34.    /* Maximum float */
  35. #define FLT_MAX 1.0e+37F
  36.    /* Maximum int x such that 10**x is a representable float */
  37. #define FLT_MAX_10_EXP 37
  38.  
  39.    /* Number of base-FLT_RADIX digits in the mantissa of a double */
  40. /* #define DBL_MANT_DIG 53 mjr: */
  41. #define DBL_MANT_DIG 52
  42.    /* Number of decimal digits of precision in a double */
  43. #define DBL_DIG 15
  44.    /* Minimum double x such that 1.0+x != 1.0 */
  45. #define DBL_EPSILON 1.0e-15
  46.    /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */
  47. #define DBL_MIN_EXP (-1021)
  48.    /* Minimum normalised double */
  49. #define DBL_MIN 7.3e-304
  50.    /* Minimum int x such that 10**x is a normalised double */
  51. #define DBL_MIN_10_EXP (-304)
  52.    /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */
  53. #define DBL_MAX_EXP 1022 /* mjr was 1024 */
  54.    /* Maximum double */
  55. #define DBL_MAX 1.79e+304
  56.    /* Maximum int x such that 10**x is a representable double */
  57. #define DBL_MAX_10_EXP 304
  58.  
  59.    /* Number of base-FLT_RADIX digits in the mantissa of a long double */
  60. #define LDBL_MANT_DIG 52 /* mjr was 53 */
  61.    /* Number of decimal digits of precision in a long double */
  62. #define LDBL_DIG 15
  63.    /* Minimum long double x such that 1.0+x != 1.0 */
  64. #define LDBL_EPSILON 1.0e-15L
  65.    /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
  66. #define LDBL_MIN_EXP (-1021)
  67.    /* Minimum normalised long double */
  68. #define LDBL_MIN 7.3e-304L
  69.    /* Minimum int x such that 10**x is a normalised long double */
  70. #define LDBL_MIN_10_EXP (-304)
  71.    /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
  72. #define LDBL_MAX_EXP 1022
  73.    /* Maximum long double */
  74. #define LDBL_MAX 1.79e+304L
  75.    /* Maximum int x such that 10**x is a representable long double */
  76. #define LDBL_MAX_10_EXP 304
  77.  
  78.  
  79. #endif /* _FLOAT_H */
  80.